<%@ page language="java"  pageEncoding="UTF-8"%>
<%@ page import="crm.model.Notice" %>
<%@ page import="crm.control.NoticeControl"%>
<%@ page import = "crm.control.DateControl"%>
<%@ page import="crm.model.Employees" %>
<%@ page import="crm.util.ParamUtil" %>
<%@ page import="java.util.*"  %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../../resources/css/reset.css" type="text/css" media="screen" />
<link rel="stylesheet" href="../../../../resources/css/inner.css" type="text/css" media="screen" />
<style type='text/css'>
 a{font-size:12px; text-decoration:none; color:#70B300;}
</style>
    <title>修改公告通知</title>
</head> 
<body>
    <%
     Employees employees =  (Employees)session.getAttribute("user");
  	//Employees employees = new Employees();
    //employees.setId(1);
  	request.setCharacterEncoding("UTF-8");
  	int id =Integer.parseInt(request.getParameter("id"));
  	NoticeControl nc = new NoticeControl();
  	Notice notice = nc.getOneNoticeById(id);
    DateControl dc = new DateControl();
	String time = dc.Date(); 
  	String content = ParamUtil.getString(request,"content");
  	String href = "notice_update.jsp";
  	int writer = employees.getId();
  %>
   
   <form name="f" action="notice_updatedo.jsp?id=<%=id%>" method="post" onSubmit="return checkform(this);">
   <table>
        <tr>
            <td>公告标题</td>
          <td>
             <input type="text" id="theme" name="theme" value="<%=notice.getTheme()%>" /><br>
          </td>
         </tr>
       <tr>
           <td>时间</td>
            <td>
            <input type="text" id="time" name="time"  value=<%=time %> /><br/>
            </td>
        </tr>
        <tr>
        <td>作者</td>
        <td><input type="text" id="writer"  name="writer"  value=<%=writer%> /><br/>
        </td>
        </tr>
     	<tr>		
        <td>公告内容</td>
	    <td>
	    	 <textarea id="sale_target"  name="sale_target" style='width: 252px; height:230px;'><%out.println(notice.getContent());%></textarea>	    	
	    </td>
</tr>

<tr >
   <td colspan='2' style='text-align: center;'>
	<input type="submit" class='button' id="submit" value="提交" />&nbsp;&nbsp;&nbsp;&nbsp;
	<input type="reset" class='button' value="取消" onClick="window.top.location.href='notice.jsp'"/>
	</td> 
	</tr>
</table>
</form>
  </body>
</html>
